﻿@model ProviderModel
@{
    Layout = "~/Administrator/Views/Shared/_AdminPopupLayout.cshtml";
}
@{
    ViewBag.Title = T("Common.Edit") + ": " + Model.FriendlyName.Truncate(30, "...");
}
@if (ViewBag.RefreshPage == true)
{
    <script type="text/javascript">
        try { window.opener.document.getElementById('@(ViewBag.btnId)').click(); }
        catch (e) { }
        window.close();
    </script>

    return;
}
@using (Html.BeginForm())
{

    @Html.ValidationSummary(false)
    @Html.HiddenFor(model => model.SystemName)
    <div class="row">
        <div class="col-md-12">
            <div class="portlet light">
                <div class="section-header sticky">
                    <div class="caption">
                        <img src="@Url.Content(Model.IconUrl)" alt="@Model.FriendlyName" style="width:20px;" />
                        <span class="caption-subject font-red-sunglo bold uppercase"> @ViewBag.Title</span>
                    </div>

                    <div class="actions">
                        <button type="submit" name="save" value="save" class="btn btn-primary"><i class="fa fa-check"></i>@T("Admin.Common.Save")</button>
                    </div>
                </div>
                <div class="portlet-body form form-horizontal form-bordered form-row-stripped">
                    <div class="portlet">
                        <div class="portlet-body form">
                            <div class="form-horizontal">
                                @(Html.LocalizedEditor<ProviderModel, ProviderLocalizedModel>("provider-localized",
                                @<div class="form-body">
                                    <div class="form-group">
                                        <label class="control-label col-md-2">
                                            @Html.LangLabelFor(model => model.Locales[item].FriendlyName)
                                        </label>
                                        <div class="col-md-9">
                                            @Html.TextBoxFor(model => Model.Locales[item].FriendlyName, new { @class = "form-control" })
                                            @Html.ValidationMessageFor(model => model.Locales[item].FriendlyName)

                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="control-label col-md-2">
                                            @Html.LangLabelFor(model => model.Locales[item].Description)
                                        </label>
                                        <div class="col-md-9">
                                            @Html.TextAreaFor(model => Model.Locales[item].Description, new { @class = "form-control" })
                                            @Html.ValidationMessageFor(model => model.Locales[item].Description)
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="control-label col-md-2">

                                        </label>
                                        <div class="col-md-9">
                                            @Html.HiddenFor(model => model.Locales[item].LanguageId)
                                        </div>
                                    </div>
                                </div>
	            ,
                @<div class="form-body">
                    <div class="form-group">
                        <label class="control-label col-md-2">
                            @Html.LangLabelFor(model => model.FriendlyName)
                        </label>
                        <div class="col-md-9">
                            @Html.TextAreaFor(model => Model.FriendlyName, new { @class = "form-control", row = 5 })
                            @Html.ValidationMessageFor(model => model.FriendlyName)
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-md-2">
                            @Html.LangLabelFor(model => model.Description)
                        </label>
                        <div class="col-md-9">
                            @Html.TextAreaFor(model => model.Description, new { @class = "form-control" })
                            @Html.ValidationMessageFor(model => model.Description)
                        </div>
                    </div>

                </div>))
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
}



